
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>TableGen BackEnds &mdash; LLVM 3.7 documentation</title>
    
    <link rel="stylesheet" href="../_static/llvm-theme.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../',
        VERSION:     '3.7',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <link rel="top" title="LLVM 3.7 documentation" href="../index.html" />
    <link rel="up" title="TableGen" href="index.html" />
    <link rel="next" title="TableGen Language Reference" href="LangRef.html" />
    <link rel="prev" title="TableGen" href="index.html" />
<style type="text/css">
  table.right { float: right; margin-left: 20px; }
  table.right td { border: 1px solid #ccc; }
</style>

  </head>
  <body role="document">
<div class="logo">
  <a href="../index.html">
    <img src="../_static/logo.png"
         alt="LLVM Logo" width="250" height="88"/></a>
</div>

    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="LangRef.html" title="TableGen Language Reference"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="index.html" title="TableGen"
             accesskey="P">previous</a> |</li>
  <li><a href="http://llvm.org/">LLVM Home</a>&nbsp;|&nbsp;</li>
  <li><a href="../index.html">Documentation</a>&raquo;</li>

          <li class="nav-item nav-item-1"><a href="index.html" accesskey="U">TableGen</a> &raquo;</li> 
      </ul>
    </div>


    <div class="document">
      <div class="documentwrapper">
          <div class="body" role="main">
            
  <div class="section" id="tablegen-backends">
<h1>TableGen BackEnds<a class="headerlink" href="#tablegen-backends" title="Permalink to this headline">¶</a></h1>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#introduction" id="id1">Introduction</a></li>
<li><a class="reference internal" href="#llvm-backends" id="id2">LLVM BackEnds</a><ul>
<li><a class="reference internal" href="#codeemitter" id="id3">CodeEmitter</a></li>
<li><a class="reference internal" href="#registerinfo" id="id4">RegisterInfo</a></li>
<li><a class="reference internal" href="#instrinfo" id="id5">InstrInfo</a></li>
<li><a class="reference internal" href="#asmwriter" id="id6">AsmWriter</a></li>
<li><a class="reference internal" href="#asmmatcher" id="id7">AsmMatcher</a></li>
<li><a class="reference internal" href="#disassembler" id="id8">Disassembler</a></li>
<li><a class="reference internal" href="#pseudolowering" id="id9">PseudoLowering</a></li>
<li><a class="reference internal" href="#callingconv" id="id10">CallingConv</a></li>
<li><a class="reference internal" href="#dagisel" id="id11">DAGISel</a></li>
<li><a class="reference internal" href="#dfapacketizer" id="id12">DFAPacketizer</a></li>
<li><a class="reference internal" href="#fastisel" id="id13">FastISel</a></li>
<li><a class="reference internal" href="#subtarget" id="id14">Subtarget</a></li>
<li><a class="reference internal" href="#intrinsic" id="id15">Intrinsic</a></li>
<li><a class="reference internal" href="#optparserdefs" id="id16">OptParserDefs</a></li>
<li><a class="reference internal" href="#ctags" id="id17">CTags</a></li>
</ul>
</li>
<li><a class="reference internal" href="#clang-backends" id="id18">Clang BackEnds</a><ul>
<li><a class="reference internal" href="#clangattrclasses" id="id19">ClangAttrClasses</a></li>
<li><a class="reference internal" href="#clangattrparserstringswitches" id="id20">ClangAttrParserStringSwitches</a></li>
<li><a class="reference internal" href="#clangattrimpl" id="id21">ClangAttrImpl</a></li>
<li><a class="reference internal" href="#clangattrlist" id="id22">ClangAttrList</a></li>
<li><a class="reference internal" href="#clangattrpchread" id="id23">ClangAttrPCHRead</a></li>
<li><a class="reference internal" href="#clangattrpchwrite" id="id24">ClangAttrPCHWrite</a></li>
<li><a class="reference internal" href="#clangattrspellings" id="id25">ClangAttrSpellings</a></li>
<li><a class="reference internal" href="#clangattrspellinglistindex" id="id26">ClangAttrSpellingListIndex</a></li>
<li><a class="reference internal" href="#clangattrvisitor" id="id27">ClangAttrVisitor</a></li>
<li><a class="reference internal" href="#clangattrtemplateinstantiate" id="id28">ClangAttrTemplateInstantiate</a></li>
<li><a class="reference internal" href="#clangattrparsedattrlist" id="id29">ClangAttrParsedAttrList</a></li>
<li><a class="reference internal" href="#clangattrparsedattrimpl" id="id30">ClangAttrParsedAttrImpl</a></li>
<li><a class="reference internal" href="#clangattrparsedattrkinds" id="id31">ClangAttrParsedAttrKinds</a></li>
<li><a class="reference internal" href="#clangattrdump" id="id32">ClangAttrDump</a></li>
<li><a class="reference internal" href="#clangdiagsdefs" id="id33">ClangDiagsDefs</a></li>
<li><a class="reference internal" href="#clangdiaggroups" id="id34">ClangDiagGroups</a></li>
<li><a class="reference internal" href="#clangdiagsindexname" id="id35">ClangDiagsIndexName</a></li>
<li><a class="reference internal" href="#clangcommentnodes" id="id36">ClangCommentNodes</a></li>
<li><a class="reference internal" href="#clangdeclnodes" id="id37">ClangDeclNodes</a></li>
<li><a class="reference internal" href="#clangstmtnodes" id="id38">ClangStmtNodes</a></li>
<li><a class="reference internal" href="#clangsacheckers" id="id39">ClangSACheckers</a></li>
<li><a class="reference internal" href="#clangcommenthtmltags" id="id40">ClangCommentHTMLTags</a></li>
<li><a class="reference internal" href="#clangcommenthtmltagsproperties" id="id41">ClangCommentHTMLTagsProperties</a></li>
<li><a class="reference internal" href="#clangcommenthtmlnamedcharacterreferences" id="id42">ClangCommentHTMLNamedCharacterReferences</a></li>
<li><a class="reference internal" href="#clangcommentcommandinfo" id="id43">ClangCommentCommandInfo</a></li>
<li><a class="reference internal" href="#clangcommentcommandlist" id="id44">ClangCommentCommandList</a></li>
<li><a class="reference internal" href="#armneon" id="id45">ArmNeon</a></li>
<li><a class="reference internal" href="#armneonsema" id="id46">ArmNeonSema</a></li>
<li><a class="reference internal" href="#armneontest" id="id47">ArmNeonTest</a></li>
<li><a class="reference internal" href="#attrdocs" id="id48">AttrDocs</a></li>
</ul>
</li>
<li><a class="reference internal" href="#how-to-write-a-back-end" id="id49">How to write a back-end</a></li>
</ul>
</div>
<div class="section" id="introduction">
<h2><a class="toc-backref" href="#id1">Introduction</a><a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h2>
<p>TableGen backends are at the core of TableGen&#8217;s functionality. The source files
provide the semantics to a generated (in memory) structure, but it&#8217;s up to the
backend to print this out in a way that is meaningful to the user (normally a
C program including a file or a textual list of warnings, options and error
messages).</p>
<p>TableGen is used by both LLVM and Clang with very different goals. LLVM uses it
as a way to automate the generation of massive amounts of information regarding
instructions, schedules, cores and architecture features. Some backends generate
output that is consumed by more than one source file, so they need to be created
in a way that is easy to use pre-processor tricks. Some backends can also print
C code structures, so that they can be directly included as-is.</p>
<p>Clang, on the other hand, uses it mainly for diagnostic messages (errors,
warnings, tips) and attributes, so more on the textual end of the scale.</p>
</div>
<div class="section" id="llvm-backends">
<h2><a class="toc-backref" href="#id2">LLVM BackEnds</a><a class="headerlink" href="#llvm-backends" title="Permalink to this headline">¶</a></h2>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">This document is raw. Each section below needs three sub-sections: description
of its purpose with a list of users, output generated from generic input, and
finally why it needed a new backend (in case there&#8217;s something similar).</p>
</div>
<p>Overall, each backend will take the same TableGen file type and transform into
similar output for different targets/uses. There is an implicit contract between
the TableGen files, the back-ends and their users.</p>
<p>For instance, a global contract is that each back-end produces macro-guarded
sections. Based on whether the file is included by a header or a source file,
or even in which context of each file the include is being used, you have
todefine a macro just before including it, to get the right output:</p>
<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#define GET_REGINFO_TARGET_DESC</span>
<span class="cp">#include &quot;ARMGenRegisterInfo.inc&quot;</span>
</pre></div>
</div>
<p>And just part of the generated file would be included. This is useful if
you need the same information in multiple formats (instantiation, initialization,
getter/setter functions, etc) from the same source TableGen file without having
to re-compile the TableGen file multiple times.</p>
<p>Sometimes, multiple macros might be defined before the same include file to
output multiple blocks:</p>
<div class="highlight-c++"><div class="highlight"><pre><span class="cp">#define GET_REGISTER_MATCHER</span>
<span class="cp">#define GET_SUBTARGET_FEATURE_NAME</span>
<span class="cp">#define GET_MATCHER_IMPLEMENTATION</span>
<span class="cp">#include &quot;ARMGenAsmMatcher.inc&quot;</span>
</pre></div>
</div>
<p>The macros will be undef&#8217;d automatically as they&#8217;re used, in the include file.</p>
<p>On all LLVM back-ends, the <code class="docutils literal"><span class="pre">llvm-tblgen</span></code> binary will be executed on the root
TableGen file <code class="docutils literal"><span class="pre">&lt;Target&gt;.td</span></code>, which should include all others. This guarantees
that all information needed is accessible, and that no duplication is needed
in the TbleGen files.</p>
<div class="section" id="codeemitter">
<h3><a class="toc-backref" href="#id3">CodeEmitter</a><a class="headerlink" href="#codeemitter" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: CodeEmitterGen uses the descriptions of instructions and their fields to
construct an automated code emitter: a function that, given a MachineInstr,
returns the (currently, 32-bit unsigned) value of the instruction.</p>
<p><strong>Output</strong>: C++ code, implementing the target&#8217;s CodeEmitter
class by overriding the virtual functions as <code class="docutils literal"><span class="pre">&lt;Target&gt;CodeEmitter::function()</span></code>.</p>
<p><strong>Usage</strong>: Used to include directly at the end of <code class="docutils literal"><span class="pre">&lt;Target&gt;MCCodeEmitter.cpp</span></code>.</p>
</div>
<div class="section" id="registerinfo">
<h3><a class="toc-backref" href="#id4">RegisterInfo</a><a class="headerlink" href="#registerinfo" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: This tablegen backend is responsible for emitting a description of a target
register file for a code generator.  It uses instances of the Register,
RegisterAliases, and RegisterClass classes to gather this information.</p>
<p><strong>Output</strong>: C++ code with enums and structures representing the register mappings,
properties, masks, etc.</p>
<p><strong>Usage</strong>: Both on <code class="docutils literal"><span class="pre">&lt;Target&gt;BaseRegisterInfo</span></code> and <code class="docutils literal"><span class="pre">&lt;Target&gt;MCTargetDesc</span></code> (headers
and source files) with macros defining in which they are for declaration vs.
initialization issues.</p>
</div>
<div class="section" id="instrinfo">
<h3><a class="toc-backref" href="#id5">InstrInfo</a><a class="headerlink" href="#instrinfo" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: This tablegen backend is responsible for emitting a description of the target
instruction set for the code generator. (what are the differences from CodeEmitter?)</p>
<p><strong>Output</strong>: C++ code with enums and structures representing the register mappings,
properties, masks, etc.</p>
<p><strong>Usage</strong>: Both on <code class="docutils literal"><span class="pre">&lt;Target&gt;BaseInstrInfo</span></code> and <code class="docutils literal"><span class="pre">&lt;Target&gt;MCTargetDesc</span></code> (headers
and source files) with macros defining in which they are for declaration vs.</p>
</div>
<div class="section" id="asmwriter">
<h3><a class="toc-backref" href="#id6">AsmWriter</a><a class="headerlink" href="#asmwriter" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Emits an assembly printer for the current target.</p>
<p><strong>Output</strong>: Implementation of <code class="docutils literal"><span class="pre">&lt;Target&gt;InstPrinter::printInstruction()</span></code>, among
other things.</p>
<p><strong>Usage</strong>: Included directly into <code class="docutils literal"><span class="pre">InstPrinter/&lt;Target&gt;InstPrinter.cpp</span></code>.</p>
</div>
<div class="section" id="asmmatcher">
<h3><a class="toc-backref" href="#id7">AsmMatcher</a><a class="headerlink" href="#asmmatcher" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Emits a target specifier matcher for
converting parsed assembly operands in the MCInst structures. It also
emits a matcher for custom operand parsing. Extensive documentation is
written on the <code class="docutils literal"><span class="pre">AsmMatcherEmitter.cpp</span></code> file.</p>
<p><strong>Output</strong>: Assembler parsers&#8217; matcher functions, declarations, etc.</p>
<p><strong>Usage</strong>: Used in back-ends&#8217; <code class="docutils literal"><span class="pre">AsmParser/&lt;Target&gt;AsmParser.cpp</span></code> for
building the AsmParser class.</p>
</div>
<div class="section" id="disassembler">
<h3><a class="toc-backref" href="#id8">Disassembler</a><a class="headerlink" href="#disassembler" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Contains disassembler table emitters for various
architectures. Extensive documentation is written on the
<code class="docutils literal"><span class="pre">DisassemblerEmitter.cpp</span></code> file.</p>
<p><strong>Output</strong>: Decoding tables, static decoding functions, etc.</p>
<p><strong>Usage</strong>: Directly included in <code class="docutils literal"><span class="pre">Disassembler/&lt;Target&gt;Disassembler.cpp</span></code>
to cater for all default decodings, after all hand-made ones.</p>
</div>
<div class="section" id="pseudolowering">
<h3><a class="toc-backref" href="#id9">PseudoLowering</a><a class="headerlink" href="#pseudolowering" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Generate pseudo instruction lowering.</p>
<p><strong>Output</strong>: Implements <code class="docutils literal"><span class="pre">ARMAsmPrinter::emitPseudoExpansionLowering()</span></code>.</p>
<p><strong>Usage</strong>: Included directly into <code class="docutils literal"><span class="pre">&lt;Target&gt;AsmPrinter.cpp</span></code>.</p>
</div>
<div class="section" id="callingconv">
<h3><a class="toc-backref" href="#id10">CallingConv</a><a class="headerlink" href="#callingconv" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Responsible for emitting descriptions of the calling
conventions supported by this target.</p>
<p><strong>Output</strong>: Implement static functions to deal with calling conventions
chained by matching styles, returning false on no match.</p>
<p><strong>Usage</strong>: Used in ISelLowering and FastIsel as function pointers to
implementation returned by a CC sellection function.</p>
</div>
<div class="section" id="dagisel">
<h3><a class="toc-backref" href="#id11">DAGISel</a><a class="headerlink" href="#dagisel" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Generate a DAG instruction selector.</p>
<p><strong>Output</strong>: Creates huge functions for automating DAG selection.</p>
<p><strong>Usage</strong>: Included in <code class="docutils literal"><span class="pre">&lt;Target&gt;ISelDAGToDAG.cpp</span></code> inside the target&#8217;s
implementation of <code class="docutils literal"><span class="pre">SelectionDAGISel</span></code>.</p>
</div>
<div class="section" id="dfapacketizer">
<h3><a class="toc-backref" href="#id12">DFAPacketizer</a><a class="headerlink" href="#dfapacketizer" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: This class parses the Schedule.td file and produces an API that
can be used to reason about whether an instruction can be added to a packet
on a VLIW architecture. The class internally generates a deterministic finite
automaton (DFA) that models all possible mappings of machine instructions
to functional units as instructions are added to a packet.</p>
<p><strong>Output</strong>: Scheduling tables for GPU back-ends (Hexagon, AMD).</p>
<p><strong>Usage</strong>: Included directly on <code class="docutils literal"><span class="pre">&lt;Target&gt;InstrInfo.cpp</span></code>.</p>
</div>
<div class="section" id="fastisel">
<h3><a class="toc-backref" href="#id13">FastISel</a><a class="headerlink" href="#fastisel" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: This tablegen backend emits code for use by the &#8220;fast&#8221;
instruction selection algorithm. See the comments at the top of
lib/CodeGen/SelectionDAG/FastISel.cpp for background. This file
scans through the target&#8217;s tablegen instruction-info files
and extracts instructions with obvious-looking patterns, and it emits
code to look up these instructions by type and operator.</p>
<p><strong>Output</strong>: Generates <code class="docutils literal"><span class="pre">Predicate</span></code> and <code class="docutils literal"><span class="pre">FastEmit</span></code> methods.</p>
<p><strong>Usage</strong>: Implements private methods of the targets&#8217; implementation
of <code class="docutils literal"><span class="pre">FastISel</span></code> class.</p>
</div>
<div class="section" id="subtarget">
<h3><a class="toc-backref" href="#id14">Subtarget</a><a class="headerlink" href="#subtarget" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Generate subtarget enumerations.</p>
<p><strong>Output</strong>: Enums, globals, local tables for sub-target information.</p>
<p><strong>Usage</strong>: Populates <code class="docutils literal"><span class="pre">&lt;Target&gt;Subtarget</span></code> and
<code class="docutils literal"><span class="pre">MCTargetDesc/&lt;Target&gt;MCTargetDesc</span></code> files (both headers and source).</p>
</div>
<div class="section" id="intrinsic">
<h3><a class="toc-backref" href="#id15">Intrinsic</a><a class="headerlink" href="#intrinsic" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Generate (target) intrinsic information.</p>
</div>
<div class="section" id="optparserdefs">
<h3><a class="toc-backref" href="#id16">OptParserDefs</a><a class="headerlink" href="#optparserdefs" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Print enum values for a class.</p>
</div>
<div class="section" id="ctags">
<h3><a class="toc-backref" href="#id17">CTags</a><a class="headerlink" href="#ctags" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: This tablegen backend emits an index of definitions in ctags(1)
format. A helper script, utils/TableGen/tdtags, provides an easier-to-use
interface; run &#8216;tdtags -H&#8217; for documentation.</p>
</div>
</div>
<div class="section" id="clang-backends">
<h2><a class="toc-backref" href="#id18">Clang BackEnds</a><a class="headerlink" href="#clang-backends" title="Permalink to this headline">¶</a></h2>
<div class="section" id="clangattrclasses">
<h3><a class="toc-backref" href="#id19">ClangAttrClasses</a><a class="headerlink" href="#clangattrclasses" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Creates Attrs.inc, which contains semantic attribute class
declarations for any attribute in <code class="docutils literal"><span class="pre">Attr.td</span></code> that has not set <code class="docutils literal"><span class="pre">ASTNode</span> <span class="pre">=</span> <span class="pre">0</span></code>.
This file is included as part of <code class="docutils literal"><span class="pre">Attr.h</span></code>.</p>
</div>
<div class="section" id="clangattrparserstringswitches">
<h3><a class="toc-backref" href="#id20">ClangAttrParserStringSwitches</a><a class="headerlink" href="#clangattrparserstringswitches" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Creates AttrParserStringSwitches.inc, which contains
StringSwitch::Case statements for parser-related string switches. Each switch
is given its own macro (such as <code class="docutils literal"><span class="pre">CLANG_ATTR_ARG_CONTEXT_LIST</span></code>, or
<code class="docutils literal"><span class="pre">CLANG_ATTR_IDENTIFIER_ARG_LIST</span></code>), which is expected to be defined before
including AttrParserStringSwitches.inc, and undefined after.</p>
</div>
<div class="section" id="clangattrimpl">
<h3><a class="toc-backref" href="#id21">ClangAttrImpl</a><a class="headerlink" href="#clangattrimpl" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Creates AttrImpl.inc, which contains semantic attribute class
definitions for any attribute in <code class="docutils literal"><span class="pre">Attr.td</span></code> that has not set <code class="docutils literal"><span class="pre">ASTNode</span> <span class="pre">=</span> <span class="pre">0</span></code>.
This file is included as part of <code class="docutils literal"><span class="pre">AttrImpl.cpp</span></code>.</p>
</div>
<div class="section" id="clangattrlist">
<h3><a class="toc-backref" href="#id22">ClangAttrList</a><a class="headerlink" href="#clangattrlist" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Creates AttrList.inc, which is used when a list of semantic
attribute identifiers is required. For instance, <code class="docutils literal"><span class="pre">AttrKinds.h</span></code> includes this
file to generate the list of <code class="docutils literal"><span class="pre">attr::Kind</span></code> enumeration values. This list is
separated out into multiple categories: attributes, inheritable attributes, and
inheritable parameter attributes. This categorization happens automatically
based on information in <code class="docutils literal"><span class="pre">Attr.td</span></code> and is used to implement the <code class="docutils literal"><span class="pre">classof</span></code>
functionality required for <code class="docutils literal"><span class="pre">dyn_cast</span></code> and similar APIs.</p>
</div>
<div class="section" id="clangattrpchread">
<h3><a class="toc-backref" href="#id23">ClangAttrPCHRead</a><a class="headerlink" href="#clangattrpchread" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Creates AttrPCHRead.inc, which is used to deserialize attributes
in the <code class="docutils literal"><span class="pre">ASTReader::ReadAttributes</span></code> function.</p>
</div>
<div class="section" id="clangattrpchwrite">
<h3><a class="toc-backref" href="#id24">ClangAttrPCHWrite</a><a class="headerlink" href="#clangattrpchwrite" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Creates AttrPCHWrite.inc, which is used to serialize attributes in
the <code class="docutils literal"><span class="pre">ASTWriter::WriteAttributes</span></code> function.</p>
</div>
<div class="section" id="clangattrspellings">
<h3><a class="toc-backref" href="#id25">ClangAttrSpellings</a><a class="headerlink" href="#clangattrspellings" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Creates AttrSpellings.inc, which is used to implement the
<code class="docutils literal"><span class="pre">__has_attribute</span></code> feature test macro.</p>
</div>
<div class="section" id="clangattrspellinglistindex">
<h3><a class="toc-backref" href="#id26">ClangAttrSpellingListIndex</a><a class="headerlink" href="#clangattrspellinglistindex" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Creates AttrSpellingListIndex.inc, which is used to map parsed
attribute spellings (including which syntax or scope was used) to an attribute
spelling list index. These spelling list index values are internal
implementation details exposed via
<code class="docutils literal"><span class="pre">AttributeList::getAttributeSpellingListIndex</span></code>.</p>
</div>
<div class="section" id="clangattrvisitor">
<h3><a class="toc-backref" href="#id27">ClangAttrVisitor</a><a class="headerlink" href="#clangattrvisitor" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Creates AttrVisitor.inc, which is used when implementing
recursive AST visitors.</p>
</div>
<div class="section" id="clangattrtemplateinstantiate">
<h3><a class="toc-backref" href="#id28">ClangAttrTemplateInstantiate</a><a class="headerlink" href="#clangattrtemplateinstantiate" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Creates AttrTemplateInstantiate.inc, which implements the
<code class="docutils literal"><span class="pre">instantiateTemplateAttribute</span></code> function, used when instantiating a template
that requires an attribute to be cloned.</p>
</div>
<div class="section" id="clangattrparsedattrlist">
<h3><a class="toc-backref" href="#id29">ClangAttrParsedAttrList</a><a class="headerlink" href="#clangattrparsedattrlist" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Creates AttrParsedAttrList.inc, which is used to generate the
<code class="docutils literal"><span class="pre">AttributeList::Kind</span></code> parsed attribute enumeration.</p>
</div>
<div class="section" id="clangattrparsedattrimpl">
<h3><a class="toc-backref" href="#id30">ClangAttrParsedAttrImpl</a><a class="headerlink" href="#clangattrparsedattrimpl" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Creates AttrParsedAttrImpl.inc, which is used by
<code class="docutils literal"><span class="pre">AttributeList.cpp</span></code> to implement several functions on the <code class="docutils literal"><span class="pre">AttributeList</span></code>
class. This functionality is implemented via the <code class="docutils literal"><span class="pre">AttrInfoMap</span> <span class="pre">ParsedAttrInfo</span></code>
array, which contains one element per parsed attribute object.</p>
</div>
<div class="section" id="clangattrparsedattrkinds">
<h3><a class="toc-backref" href="#id31">ClangAttrParsedAttrKinds</a><a class="headerlink" href="#clangattrparsedattrkinds" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Creates AttrParsedAttrKinds.inc, which is used to implement the
<code class="docutils literal"><span class="pre">AttributeList::getKind</span></code> function, mapping a string (and syntax) to a parsed
attribute <code class="docutils literal"><span class="pre">AttributeList::Kind</span></code> enumeration.</p>
</div>
<div class="section" id="clangattrdump">
<h3><a class="toc-backref" href="#id32">ClangAttrDump</a><a class="headerlink" href="#clangattrdump" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Creates AttrDump.inc, which dumps information about an attribute.
It is used to implement <code class="docutils literal"><span class="pre">ASTDumper::dumpAttr</span></code>.</p>
</div>
<div class="section" id="clangdiagsdefs">
<h3><a class="toc-backref" href="#id33">ClangDiagsDefs</a><a class="headerlink" href="#clangdiagsdefs" title="Permalink to this headline">¶</a></h3>
<p>Generate Clang diagnostics definitions.</p>
</div>
<div class="section" id="clangdiaggroups">
<h3><a class="toc-backref" href="#id34">ClangDiagGroups</a><a class="headerlink" href="#clangdiaggroups" title="Permalink to this headline">¶</a></h3>
<p>Generate Clang diagnostic groups.</p>
</div>
<div class="section" id="clangdiagsindexname">
<h3><a class="toc-backref" href="#id35">ClangDiagsIndexName</a><a class="headerlink" href="#clangdiagsindexname" title="Permalink to this headline">¶</a></h3>
<p>Generate Clang diagnostic name index.</p>
</div>
<div class="section" id="clangcommentnodes">
<h3><a class="toc-backref" href="#id36">ClangCommentNodes</a><a class="headerlink" href="#clangcommentnodes" title="Permalink to this headline">¶</a></h3>
<p>Generate Clang AST comment nodes.</p>
</div>
<div class="section" id="clangdeclnodes">
<h3><a class="toc-backref" href="#id37">ClangDeclNodes</a><a class="headerlink" href="#clangdeclnodes" title="Permalink to this headline">¶</a></h3>
<p>Generate Clang AST declaration nodes.</p>
</div>
<div class="section" id="clangstmtnodes">
<h3><a class="toc-backref" href="#id38">ClangStmtNodes</a><a class="headerlink" href="#clangstmtnodes" title="Permalink to this headline">¶</a></h3>
<p>Generate Clang AST statement nodes.</p>
</div>
<div class="section" id="clangsacheckers">
<h3><a class="toc-backref" href="#id39">ClangSACheckers</a><a class="headerlink" href="#clangsacheckers" title="Permalink to this headline">¶</a></h3>
<p>Generate Clang Static Analyzer checkers.</p>
</div>
<div class="section" id="clangcommenthtmltags">
<h3><a class="toc-backref" href="#id40">ClangCommentHTMLTags</a><a class="headerlink" href="#clangcommenthtmltags" title="Permalink to this headline">¶</a></h3>
<p>Generate efficient matchers for HTML tag names that are used in documentation comments.</p>
</div>
<div class="section" id="clangcommenthtmltagsproperties">
<h3><a class="toc-backref" href="#id41">ClangCommentHTMLTagsProperties</a><a class="headerlink" href="#clangcommenthtmltagsproperties" title="Permalink to this headline">¶</a></h3>
<p>Generate efficient matchers for HTML tag properties.</p>
</div>
<div class="section" id="clangcommenthtmlnamedcharacterreferences">
<h3><a class="toc-backref" href="#id42">ClangCommentHTMLNamedCharacterReferences</a><a class="headerlink" href="#clangcommenthtmlnamedcharacterreferences" title="Permalink to this headline">¶</a></h3>
<p>Generate function to translate named character references to UTF-8 sequences.</p>
</div>
<div class="section" id="clangcommentcommandinfo">
<h3><a class="toc-backref" href="#id43">ClangCommentCommandInfo</a><a class="headerlink" href="#clangcommentcommandinfo" title="Permalink to this headline">¶</a></h3>
<p>Generate command properties for commands that are used in documentation comments.</p>
</div>
<div class="section" id="clangcommentcommandlist">
<h3><a class="toc-backref" href="#id44">ClangCommentCommandList</a><a class="headerlink" href="#clangcommentcommandlist" title="Permalink to this headline">¶</a></h3>
<p>Generate list of commands that are used in documentation comments.</p>
</div>
<div class="section" id="armneon">
<h3><a class="toc-backref" href="#id45">ArmNeon</a><a class="headerlink" href="#armneon" title="Permalink to this headline">¶</a></h3>
<p>Generate arm_neon.h for clang.</p>
</div>
<div class="section" id="armneonsema">
<h3><a class="toc-backref" href="#id46">ArmNeonSema</a><a class="headerlink" href="#armneonsema" title="Permalink to this headline">¶</a></h3>
<p>Generate ARM NEON sema support for clang.</p>
</div>
<div class="section" id="armneontest">
<h3><a class="toc-backref" href="#id47">ArmNeonTest</a><a class="headerlink" href="#armneontest" title="Permalink to this headline">¶</a></h3>
<p>Generate ARM NEON tests for clang.</p>
</div>
<div class="section" id="attrdocs">
<h3><a class="toc-backref" href="#id48">AttrDocs</a><a class="headerlink" href="#attrdocs" title="Permalink to this headline">¶</a></h3>
<p><strong>Purpose</strong>: Creates <code class="docutils literal"><span class="pre">AttributeReference.rst</span></code> from <code class="docutils literal"><span class="pre">AttrDocs.td</span></code>, and is
used for documenting user-facing attributes.</p>
</div>
</div>
<div class="section" id="how-to-write-a-back-end">
<h2><a class="toc-backref" href="#id49">How to write a back-end</a><a class="headerlink" href="#how-to-write-a-back-end" title="Permalink to this headline">¶</a></h2>
<p>TODO.</p>
<p>Until we get a step-by-step HowTo for writing TableGen backends, you can at
least grab the boilerplate (build system, new files, etc.) from Clang&#8217;s
r173931.</p>
<p>TODO: How they work, how to write one.  This section should not contain details
about any particular backend, except maybe <code class="docutils literal"><span class="pre">-print-enums</span></code> as an example.  This
should highlight the APIs in <code class="docutils literal"><span class="pre">TableGen/Record.h</span></code>.</p>
</div>
</div>


          </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="LangRef.html" title="TableGen Language Reference"
             >next</a> |</li>
        <li class="right" >
          <a href="index.html" title="TableGen"
             >previous</a> |</li>
  <li><a href="http://llvm.org/">LLVM Home</a>&nbsp;|&nbsp;</li>
  <li><a href="../index.html">Documentation</a>&raquo;</li>

          <li class="nav-item nav-item-1"><a href="index.html" >TableGen</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &copy; Copyright 2003-2015, LLVM Project.
      Last updated on 2015-09-08.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.1.
    </div>
  </body>
</html>